package source.realRobot;

public class Motor {

	Wheel wheel;
	
	long lastMoved;
	
	public Motor(Wheel w){
		wheel = w;
		lastMoved = 0;
	}
	
	public void move(long timeStamp){
		long timeElapsed = timeStamp - lastMoved;
		
		wheel.setNewVelocity(timeElapsed);
		lastMoved = timeStamp;
	}

	public void reset() {
		lastMoved = 0;
	}
}
